package com.dlc.beijingrfid.adapter;

import com.dlc.commonlibrary.adapter.BaseRecyclerAdapter;
import com.dlc.commonlibrary.utils.TimeFormats;
import com.dlc.beijingrfid.R;
import com.dlc.beijingrfid.model.InventoryRecordBean;

/**
 * Created by John on 2017/7/19.
 */

public class InventoryRecordAdapter<T extends InventoryRecordBean.DataBean> extends BaseRecyclerAdapter<T> {
    
    
    
    @Override
    public int getItemLayoutId(int viewType) {
        return R.layout.item_inventory_record;
    }

    @Override
    public void onBindViewHolder(CommonHolder holder, int position) {
        T item = getItem(position);
        holder.setText(R.id.tv_name, item.getWarehouse_id()+"--库位"+item.getFrameno());
        holder.setText(R.id.tv_time, TimeFormats.formatDateTimeSecend(item.getCtime()*1000));
    }
}
